﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace MetroCalendar.Controls
{
    public partial class SpeakerMemoPanel : UserControl
    {
        #region external methods
        public void Start()
        {
            foreach (UIElement element in BarsStackPanel.Children)
            {
                Bar bar = element as Bar;
                bar.Start();
            }
        }

        public void Stop()
        {
            foreach (UIElement element in BarsStackPanel.Children)
            {
                Bar bar = element as Bar;
                bar.Stop();
            }
        }
        #endregion

        #region constructor
        public SpeakerMemoPanel()
        {
            InitializeComponent();

            for (int i = 0; i < 32; ++i)
            {
                Bar bar = new Bar()
                {
                    Margin = new Thickness(8, 0, 0, 0),
                    Height = 220
                };

                BarsStackPanel.Children.Add(bar);
            }
        }
        #endregion
    }
}
